﻿<?xml version="1.0" encoding="utf-8" ?>
<!-- Sample configuration file for the TFS Migration and Synchronization Toolkit v1.1.31205.01 -->
<Migration>
  
  <!-- Sample VC configuration -->
  <VC>
    <Sessions>
      <Session id="SampleDocumentLibraryToTfsSession" provider="WssVcProvider">
        
        <!-- Map the document libraray to the TFS path -->
        <Mappings>
          <Mapping src="http://WSSServer/Shared Documents" tgt="$/SampleTeamProject/WSSDocs" cloak="false" />
          <Mapping src="http://WSSServer/Shared Documents/SomeFolder" tgt="$/SampleTeamProject/WSSDocs/SomeFolder" cloak="true" />
        </Mappings>
        
        <!-- TFS workspace details -->
        <Tfs server="SampleTFS">
          <Workspace>WSS2TFS</Workspace>
          <WorkspaceRoot>c:\Workspaces\WSS</WorkspaceRoot>
        </Tfs>

        <!-- Optional setings for this session -->
        <Settings>
          <Setting name="AddStubVersionOnMissingAdd" value="true" />
          <Setting name="MigrationChangeCommentModifier" value="(Mirrored by WSS2TFS)" />
        </Settings>

        <!-- WSS provider initialization data -->
        <Source>
          <WSS>
            <BaseUrl>http://WSSServer</BaseUrl>
            <DocumentLibrary>Shared Documents</DocumentLibrary>
            <GMTOffset>05:00</GMTOffset>
          </WSS>
        </Source>

        <!-- Configure the text report -->
        <EventSinks>
          <EventSink provider="TextReport">
            <TextReport>
              <File>.\wssreport.txt</File>
              <Append>true</Append>
            </TextReport>
          </EventSink>
        </EventSinks>
        
      </Session>
    </Sessions>
  </VC>

  <!-- Sample WIT configuration -->
  <WIT>
    <Sessions>
      <Session id="SampleTaskListToTfsSession">

        <!-- TFS details -->
        <Tfs server="SampleTFS" fieldForm="Reference">
          <Project>SampleTeamProject</Project>
          <Filter>[System.WorkItemType]='WssTask'</Filter>
          <WriteQueue threadCount="0"/>
          <FileAttachments filesPerUpdate="1" />
        </Tfs>

        <!-- WSS provider initialization data -->
        <Source>
          <Provider provider="WssWitProvider">
            <InitializationData>
              <BaseUrl>http://sharedserver</BaseUrl>
              <TaskList>Tasks</TaskList>
            </InitializationData>
            <WriteQueue threadCount="0"/>
          </Provider>
        </Source>
        
        <FastQueue threadCount="0"/>
        <SlowQueue threadCount="0"/>

        <!-- Work Item Type mappings -->
        <WorkItemTypes>
          <WorkItemType tfs="WssTask" other="WssTask" fieldMap="Wss2TfsWit"/>
        </WorkItemTypes>

        <!-- Policy Settings -->
        <Policies>
          <MissingUser reaction="throw"/>
          <FieldConflict master="other" reaction="master"/>
          <AttachmentsConflict master="default" reaction="union" extraComparisonAttributes="all"/>
          <LinksConflict master="default" reaction="union" />
          <MissingArea reaction="create"/>
          <MissingIteration reaction="create"/>
        </Policies>

        <!-- Configure the text report -->
        <EventSinks>
          <EventSink provider="TextReport">
            <TextReport>
              <File>.\wsswitreport.txt</File>
              <Append>false</Append>
            </TextReport>
          </EventSink>
        </EventSinks>
        
      </Session>

      <!-- Sample linking session -->
      <Session id="SampleLinking">
        <Tfs server="SampleTFS">
          <Project>SampleTeamProject</Project>
        </Tfs>
        <Source>
          <Tfs server="DevTFS">
            <Project>OtherTeamProject</Project>
            <WriteQueue threadCount="2" batchSize="50"/>
          </Tfs>
        </Source>
        <Linking>
          <Engine provider="TfsLinkProvider"/>
          <VersionControl session="SampleDocumentLibraryToTfsSession" />
        </Linking>
      </Session>
    </Sessions>
    
    <FieldMaps>
      <FieldMap name="Wss2TfsWit">
        <Field tfsName="System.Id" otherName="ID"/>
        <Field tfsName="System.Title" otherName="Title"/>
        <Field tfsName="System.State" otherName="Status"/>
        <Field tfsName="System.AssignedTo" otherName="AssignedTo"/>
        <Field tfsName="System.Description" otherName="Body"/>
        <Field tfsName="Wss.Priority" otherName="Priority"/>
        <Field tfsName="Wss.PercentComplete" otherName="PercentComplete"/>
        <Field tfsName="Wss.StartDate" otherName="StartDate"/>
        <Field tfsName="Wss.DueDate" otherName="DueDate"/>
        <Field tfsName="System.CreatedDate" otherName="Created"/>
        <Field tfsName="System.RevisedDate" otherName="Modified"/>
        <Field tfsName="System.ChangedBy" otherName="Editor"/>
        <Field tfsName="System.Reason" otherName="Reason"/>
      </FieldMap>
    </FieldMaps>
    <ValueMaps>
      <ValueMap name="LetterToNumber">
        <Value tfs="A" other="1"/>
        <Value tfs="B" other="2"/>
        <Value tfs="C" other="3"/>
        <Value tfs="D" other="4"/>
        <Value tfs="E" other="5"/>
      </ValueMap>
    </ValueMaps>
  </WIT>
  
  <Providers>
    <Provider id="WssVcProvider">
      <AssemblyQualifiedName>Microsoft.TeamFoundation.Migration.VersionControl.WSS.WssProviderFactory, WSS2TFS_Adaptor, Version=1.1.31205.01, Culture=neutral</AssemblyQualifiedName>
    </Provider>
    <Provider id="TextReport">
      <AssemblyQualifiedName>Microsoft.TeamFoundation.Migration.Toolkit.TextReportFactory, Microsoft.TeamFoundation.Migration.Toolkit, Version=1.1.31205.01, Culture=neutral</AssemblyQualifiedName>
    </Provider>
    <Provider id="WssWitProvider">
      <AssemblyQualifiedName>Microsoft.TeamFoundation.Migration.WorkItemTracking.Wss.WssWorkItemTrackingProviderFactory, Wss2TfsWit, Version=1.1.31205.01, Culture=neutral</AssemblyQualifiedName>
    </Provider>
    <Provider id="TfsLinkProvider">
      <AssemblyQualifiedName>Microsoft.TeamFoundation.Migration.Linking.TfsLinkingEngineFactory, Microsoft.TeamFoundation.Migration.Linking, Version=1.1.31205.01, Culture=neutral</AssemblyQualifiedName>
    </Provider>
  </Providers>
  
  <Servers>
    <Tfs id="SampleTFS">
      <Server>http://tfsserver:8080</Server>
    </Tfs>
    <Tfs id="DevTFS">
      <Server>http://othertfsserver:8080/</Server>
    </Tfs>
  </Servers>
  
  <Sql>
    <ConnectionString>server=SampleSqlServer;Integrated Security=SSPI</ConnectionString>
    <Database>MigrationToolkitTest</Database>
    <Server>SampleSqlServer</Server>
  </Sql>
  
</Migration>
